from sqlalchemy.dialects.mysql import INTEGER, VARCHAR,JSON
from sqlalchemy import Column
from sqlalchemy.ext.declarative import declarative_base
from pydantic import BaseModel

Base = declarative_base()

class Admin(Base):
    __tablename__ = 'admin'

    id = Column(INTEGER, primary_key=True)
    account = Column(VARCHAR(256), default='', nullable=False)
    password = Column(VARCHAR(256), default='', nullable=False)
    create_time = Column(INTEGER, default=0)


class LoginForm(BaseModel):
    account:str
    password:str